<html>

<head>
  <title>accounts</title>
  <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
  <link rel="stylesheet" type="text/css"
    href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.17.12/swagger-ui.min.css">
</head>

<body>
  <div id="swagger-ui"></div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.17.12/swagger-ui-bundle.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/5.17.12/swagger-ui-standalone-preset.min.js"></script>
  <script>
    window.onload = function () {
      let params = new URLSearchParams(location.search);
      let spec = params.get('spec');

      const ui = SwaggerUIBundle({
        url: !spec ? "spec.yaml" : spec,
        validatorUrl: false,
        dom_id: '#swagger-ui',
        deepLinking: true,
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIStandalonePreset
        ],
        plugins: [
          SwaggerUIBundle.plugins.DownloadUrl
        ],
        defaultModelsExpandDepth: -1,
        onComplete: function () {
          // s = 'localhost:8080';
          // if (s != location.host) {
          //   a = document.querySelector('a.info__extdocs');
          //   a.href = a.href.replace(s, location.host);
          // }
        },
        layout: "StandaloneLayout"
      })

      window.ui = ui
    }
  </script>
</body>

</html>